<!DOCTYPE html>
<html>
<head>
    <title>ClassDiaryTable</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="../../css/bootstrap.min.css">
    <link rel="stylesheet" href="../../css/font-awesome.min.css">
    <link rel="stylesheet" href="../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
    <link rel="stylesheet" href="../../plugins/ztree/css/metroStyle/metroStyle.css">
    <link rel="stylesheet" href="../../css/bootstrap-table.min.css">
    <link rel="stylesheet" href="../../css/main.css">
    <link rel="stylesheet" href="../../plugins/treegrid/jquery.treegrid.css">

    <script src="../../libs/jquery.min.js"></script>
    <script src="../../plugins/layer/layer.js"></script>
    <script src="../../libs/bootstrap.min.js"></script>
    <script src="../../libs/vue.min.js"></script>
    <script src="../../libs/validator.min.js"></script>
    <script src="../../plugins/jqgrid/grid.locale-cn.js"></script>
    <script src="../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
    <script src="../../plugins/ztree/jquery.ztree.all.min.js"></script>
    <script src="../../js/common.js"></script>
    <script src="../../libs/jquery.validate.js"></script>
    <script src="../../libs/validate-methods.js"></script>
    <script src="../../libs/messages_zh.js"></script>
    <script src="../../js/setdate.js"></script>
    <script src="../../libs/My97DatePicker/4.8/WdatePicker.js"></script>

    <script src="../../js/echarts.js"></script>
    <script src="../../js/walden.js"></script>
    
    <script src="../../libs/FileSaver.js"></script>
    <script src="../../libs/jquery.wordexport.js"></script>

    <style  >
        .printArea{
            width: 800px;
            margin: auto;
            background-color: #F5F5F5
        }
        .printTitle{
            font-size: 29px !important;
            text-align: center;
            line-height: 58px;
            width: 100%;
            /*display: block;*/
            font-weight: bold;
            font-family: '方正小宋标';
        }
        .printTitle01{
            font-size: 22px !important;
            text-align: left;
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction:column;
            font-family:FangSong
        }
        .textLeftTitle{
        	font-size: 21px!important;
        	font-family: '仿宋';
        	text-align: left;
        	line-height: 32px;
        	text-indent: 42px;
        }
        .font-fold{
            font-size: 21px!important;
            text-indent: 42px;
            text-align: left;
            font-weight: bold;
            line-height: 32px!important;
            font-family:'黑体'
        }
        .font-fold01{
            font-size: 22px!important;
            text-align: left;
            font-weight: bold;
            /*line-height: 50px!important;*/
            font-family:KaiTi
        }
        .normal-para{
            text-align: left;
            font-size: 21px!important;
            text-indent: 42px;
            color:#000;
            font-family:'仿宋';
            line-height: 1.5;
        }
        .echarts-container{
            width: 100%;
            justify-content: center;
            align-items: center;
            display: flex;
            flex-direction: row;
        }
        .echarts-col{
            /*width: 100%;*/
            /*justify-content: center;*/
            /*align-items: center;*/
            /*display: flex;*/
            /*flex-direction:column;*/
        }
        .font-class{
            font-size: 22px!important;
            font-family:FangSong
        }
        .font-regular{
        	font-family: '楷体';
        	font-size: 21px!important;
        	text-align: left;
        	text-indent: 42px;
        	line-height:32px;
        }
        .tabCenter{
        	text-align: center;
        	font-size: 21px!important;
        	font-family:'仿宋';
        }
         span{
            font-size: 21px!important;
        }
    </style>
</head>
<body>
<br>
<div id="rrapp" v-cloak>


        <div class="search-container">
            <!--<div class="select-container" >-->
                <!--<select  class="mySelect" id="option" >-->
                    <!--&lt;!&ndash;<option value=''>全校</option>&ndash;&gt;-->
                    <!--&lt;!&ndash;<option value='college'>学院</option>&ndash;&gt;-->
                    <!--&lt;!&ndash;<option value='class'>班级</option>&ndash;&gt;-->
                <!--</select>-->
            <!--</div>-->
            <div class="select-container">
                <input type="text" class="mySelect" onfocus="WdatePicker()" id="startDate" name="startDate" placeholder="开始时间"/>
            </div>
            <div class="select-container">
                <input type="text" class="mySelect" onfocus="WdatePicker()" id="endDate" name="endDate"  placeholder="结束时间"/>
            </div>

            <div  class="btn-container">
                <a class="btn-thin" @click="query">查询</a>
            </div>
            <div class="btn-container">
                <div  class="normal-btn normal-color" onclick="setDate('1')">今日</div>
                <div  class="normal-btn normal-color" onclick="setDate('2')">本周</div>
                <div  class="normal-btn normal-color" onclick="setDate('3')">本月</div>
            </div>

            <div  class="btn-container">
                <!--<a class="btn-thin" onclick="exportExcel()">打印</a>-->
				<a class="btn-thin"  id="printThis">打印</a>
            </div>
        </div>

    </div>
<div>
    <!--startprint-->

    <div class="printArea" id="printArea">
    <div id="printMe">
        <div style="width: 100%;">
            <p id="printTitle" style="font-size: 22pt;text-align: center;line-height: 33pt;font-weight: bold;font-family: '方正小宋标';"></p>
        </div>
        <div style="width: 100%;">
			<p class="normal-para" style="text-align: left;font-size: 16pt;text-indent: 32pt;color:#000;font-family:'仿宋';line-height: 16pt;" id="line01"></p>
            <p class="font-fold" style="font-size: 16pt;text-indent: 32pt;text-align: left;font-weight: bold;line-height: 16pt;font-family:'黑体'">一、基本情况</p>
			<p class="normal-para" style="text-align: left;font-size: 16pt;text-indent: 32pt;color:#000;font-family:'仿宋';line-height: 16pt;">
				数据时段内，行政班级<span id="classTotal"></span>个，在校学生<span id="studentTotal"></span>名，教职工<span id="teacherTotal"></span>人。数据时段内，按要求准时记载的有<span id="classTotal02"></span>个班。
			</p>
			
			<!--<span id="classTotal01"></span>个行政班中-->
            <!--<div class="normal-para">
                数据时段，行政班级<span id="classTotal">?</span>个，
                在校学生<span id="studentTotal">?</span>名，
                任课教师<span id="teacherTotal">?</span>人。
                <div class="normal-para">
                    数据时段<span id="classTotal01"></span>个行政班中，按要求准时记载的<span id="classTotal02"></span>个班。
                </div>
            </div>-->

            <div class="normal-para" style="text-align: left;font-size: 16pt;text-indent: 32pt;color:#000;font-family:'仿宋';line-height:16pt;">使用单位资源分析如下：</div>
            <table border="1" style="width: 100%;margin: 0 auto;" cellspacing="0"  cellpadding="0">
            	<tr height="30" >
            		<th class="tabCenter" style="border:solid #000 1px;text-align: center;font-size: 16pt;font-family:'仿宋';">行政班级占比</th>
            		<th class="tabCenter" style="border:solid #000 1px;text-align: center;font-size: 16pt;font-family:'仿宋';">在校生占比</th>
            		<th class="tabCenter" style="border:solid #000 1px;text-align: center;font-size: 16pt;font-family:'仿宋';">任课教师占比</th>
            	</tr>
            	<tr height="30">
            		<td style="border:solid #000 1px;text-align: center;font-size: 16pt;font-family:'仿宋';" id="classRateTable"></td>
            		<td style="border:solid #000 1px;text-align: center;font-size: 16pt;font-family:'仿宋';" id="studentRateTable"></td>
            		<td style="border:solid #000 1px;text-align: center;font-size: 16pt;font-family:'仿宋';" id="teacherRateTable"></td>
            	</tr>
            </table>
            

            <p class="font-fold" style="font-size: 16pt;text-indent: 32pt;text-align: left;font-weight: bold;line-height: 16pt;font-family:'黑体'">
               	二、教学运行状态
            </p>
            <p class="font-regular" style="font-family: '楷体';font-size: 16pt;text-align: left;text-indent: 32pt;line-height:16pt;">
            	（一）教师状态
            </p>

            <p class="normal-para" style="text-align: left;font-size: 16pt;text-indent: 32pt;color:#000;font-family:'仿宋';line-height: 16pt;">
                1.在职教职员工<span id="teacherTotal01"></span>人，其中本学期有课教师<span id="hasCourse"></span>人。
            </p>
            <!--<table style="width: 100%;" >-->
            	<!--<tr height="30">-->
            		<!--<th></th>-->
            		<!--<th></th>-->
            		<!--<th></th>-->
            	<!--</tr>-->
            	<!--<tr>-->
            		<!--<td></td>-->
            		<!--<td id="noClassTeacherRate"  style="width: 280px;height: 220px;"  >-->
            		<!--</td>-->
            		<!--<td id="classRate" style="width: 280px;height: 220px;">-->
            			<!---->
            		<!--</td>-->
            		<!---->
            		<!--<td ></td>-->
            	<!--</tr>-->
            <!--</table>-->
            <p class="normal-para" style="text-align: left;font-size: 16pt;text-indent: 32pt;color:#000;font-family:'仿宋';line-height: 16pt;">
                2.数据时段内，共有<span id="chidaozaotui"></span>人次任课教师有迟到、早退、课程调整等情况。
            </p>
            
            <table style="width: 100%;margin: 0 auto;">
            	<tr>
            		<td></td>
            		<td id="zhengchang" style="width: 560px;height: 250px;"></td>
            		<td></td>
            	</tr>
				<tr>
					<td></td>
					<td id="chidao" style="width: 560px;height: 250px;"></td>
					<td></td>
				</tr>
				<tr>
					<td></td>
					<td id="zaotui" style="width: 560px;height: 250px;"></td>
					<td></td>
				</tr>
				<tr>
					<td></td>
					<td id="tiaozheng" style="width: 560px;height: 250px;"></td>
					<td></td>
				</tr>
            </table>





            
            <table style="width: 100%;margin: 0 auto;" border="1" cellspacing="0"  cellpadding="0" id="teacherAttTable">
            	<tr>
            		<th class="tabCenter" width="60" style="border:solid #000 1px;text-align: center;font-size: 12pt;font-family:'仿宋';">日期</th>
            		<th class="tabCenter" width="60" style="border:solid #000 1px;text-align: center;font-size: 12pt;font-family:'仿宋';">姓名</th>
            		<th class="tabCenter" style="border:solid #000 1px;text-align: center;font-size: 12pt;font-family:'仿宋';">授课名称</th>
            		<th class="tabCenter" width="60" style="border:solid #000 1px;text-align: center;font-size: 12pt;font-family:'仿宋';">节次</th>
            		<th class="tabCenter" style="border:solid #000 1px;text-align: center;font-size: 12pt;font-family:'仿宋';">授课班级</th>
            		<th class="tabCenter" width="100" style="border:solid #000 1px;text-align: center;font-size: 12pt;font-family:'仿宋';">到达时间</th>
            		<th class="tabCenter" width="100" style="border:solid #000 1px;text-align: center;font-size: 12pt;font-family:'仿宋';">离开时间</th>
            	</tr>
            </table>
 
		
		
		<p style="text-align: left;font-size: 16pt;text-indent: 32pt;color:#000;font-family:'仿宋';line-height: 16pt;">
			 3.数据时段内，本院任课教师平均授课时长<span id="teacherTime"></span>分钟，全院任课教师平均授课时长<span id="allSchoolTeacherTime">100</span>分钟。
		</p>
		<!--<span id="compare"></span>-->
		<table style="width: 100%;margin: 0 auto;">
			<tr height="1">
				<th width="15"></th>
				<th></th>
				<th width="15"></th>
			</tr>
			<tr >
				<td></td>
				<td id="teacherTimeFirstTen" style="width: 580px;height: 350px;"></td>
				<td></td>
			</tr>
		</table>
		
		<table style="width: 100%;margin: 0 auto;">
			<tr height="1">
				<th width="15"></th>
				<th></th>
				<th width="15"></th>
			</tr>
			<tr >
				<td></td>
				<td id="teacherTimeEndTen" style="width: 580px;height: 350px;"></td>
				<td></td>
			</tr>
		</table>
		<table height="50"></table>
			<p style="text-align: left;font-size: 16pt;text-indent: 32pt;color:#000;font-family:'仿宋';line-height: 16pt;">
				4.数据时段内，连堂课授课时长低于45分钟。
			</p>
			<table style="width: 100%;margin: 0 auto;" border="1" cellspacing="0"  cellpadding="0" id="teacherTimeTable">
            	<tr>
            		<th class="tabCenter" width="60" style="border:solid #000 1px;text-align: center;font-size: 16pt;font-family:'仿宋';">日期</th>
            		<th class="tabCenter" width="60" style="border:solid #000 1px;text-align: center;font-size: 16pt;font-family:'仿宋';">姓名</th>
            		<th class="tabCenter" style="border:solid #000 1px;text-align: center;font-size: 16pt;font-family:'仿宋';">授课名称</th>
            		<th class="tabCenter" width="80" style="border:solid #000 1px;text-align: center;font-size: 16pt;font-family:'仿宋';">节次</th>
            		<th class="tabCenter" style="border:solid #000 1px;text-align: center;font-size: 16pt;font-family:'仿宋';">授课班级</th>
            		<th class="tabCenter" width="100" style="border:solid #000 1px;text-align: center;font-size: 16pt;font-family:'仿宋';">授课时长</th>
            	</tr>
            </table>
		
			<p style="text-align: left;font-size: 16pt;text-indent: 32pt;color:#000;font-family:'仿宋';line-height: 16pt;">
                5.数据时段内，<span id="classTotal03" ></span>个在校行政班级，开设有课程<span id="coureTotal"></span>门，教学进度与教学日历相符率<span id="processFit"></span>%。
			</p>
			
			<table style="width: 100%;margin: 0 auto;">
				<tr height="1">
					<th></th>
					<th></th>
					<th></th>
					<th></th>
				</tr>
				<tr >
					<td width="2"></td>
					<td id="processFitRate" style="width: 300px;height: 250px;"></td>
					<td id="teacherContentPortrait" style="width: 300px;height: 250px;"></td>
					<td ></td>
				</tr>
			</table>
			
			<p style="text-align: left;font-size: 16pt;text-indent: 32pt;color:#000;font-family:'仿宋';line-height: 16pt;">
                6.数据时段内，教学工作量对比
			</p>
			
			<table style="width: 96%;margin: 0 auto;">
				<tr >
					<td id="workLoadPointline" style="width: 580px;height: 350px;"></td>
				</tr>
			</table>
		
			<p style="font-family: '楷体';font-size: 16pt;text-align: left;text-indent: 32pt;line-height:16pt;">
				（二）学生状态
			</p>
			<p style="text-align: left;font-size: 16pt;text-indent: 32pt;color:#000;font-family:'仿宋';line-height: 16pt;">
				数据时段内，正常出勤学生<span id="chuqinNumber">0</span>人次，请假学生<span id="qingjiaNumber">0</span>人次（其中公假<span id="gongjiaNumber">0</span>人次，病假<span id="bingjiaNumber">0</span>人次，私假<span id="sijiaNumber">0</span>人次），请假节次<span id="qingjia">199</span>节次，迟到<span id="chidaoTotal">0</span>人次，旷课<span id="kuangke">199</span>人次。
			</p>
			
			<p style="text-align: left;font-size: 16pt;text-indent: 32pt;color:#000;font-family:'仿宋';line-height: 16pt;">1.学生到课率占比</p>
			
			<table style="width: 100%;margin: 0 auto;">
				<tr height="1">
					<th></th>
					<th></th>
					<th></th>
					<th></th>
				</tr>
				<tr >
					<td></td>
					<td id="stuAttendanceRate" style="width: 300px;height: 250px;"></td>
					<td id="attendanceRateTime" style="width: 300px;height: 250px;"></td>
					<td></td>
				</tr>
			</table>

				<p style="text-align: left;font-size: 16pt;text-indent: 32pt;color:#000;font-family:'仿宋';line-height: 16pt;">2.专业到课率排行</p>
				<table style="width: 98%;margin: 0 auto;">
					<tr height="1">
						<th></th>
						<th></th>
						<th></th>
					</tr>
					<tr >
						<td></td>
						<td id="prossionAttFirTen" style="width: 600px;height: 350px;"></td>
						<td></td>
					</tr>
				</table>
				<p style="text-align: left;font-size: 16pt;text-indent: 32pt;color:#000;font-family:'仿宋';line-height: 16pt;">3.班级到课率排行前十名</p>
				<table style="width: 96%;margin: 0 auto;">
					<tr height="1">
						<th></th>
						<th></th>
						<th></th>
					</tr>
					<tr >
						<td></td>
						<td id="classAttFirTen" style="width: 600px;height: 350px;"></td>
						<td></td>
					</tr>
				</table>
				<!--<div id="classAttFirTen" style="height:350px;width: 800px">

				</div>-->
				<p style="text-align: left;font-size: 16pt;text-indent: 32pt;color:#000;font-family:'仿宋';line-height: 16pt;">4.班级到课率排行后十名</p>
				<table style="width: 96%;margin: 0 auto;">
					<tr height="1">
						<th></th>
						<th></th>
						<th></th>
					</tr>
					<tr >
						<td></td>
						<td id="classAttEndTen" style="width: 600px;height: 350px;"></td>
						<td></td>
					</tr>
				</table>
				<!--<div id="classAttEndTen" style="height:350px;width: 800px">

				</div>-->
			<p style="text-align: left;font-size: 16pt;text-indent: 32pt;color:#000;font-family:'仿宋';line-height: 16pt;">5.学生缺勤明细</p>
			<table style="width: 96%;margin: 0 auto;" border="1" cellspacing="0"  cellpadding="0" id="studentAttTable">
				<tr>
					<th class="tabCenter" style="border:solid #000 1px;text-align: center;font-size: 12pt;font-family:'仿宋';">日期</th>
					<th class="tabCenter" style="border:solid #000 1px;text-align: center;font-size: 12pt;font-family:'仿宋';">班级</th>
					<th class="tabCenter" style="border:solid #000 1px;text-align: center;font-size: 12pt;font-family:'仿宋';">公假</th>
					<th class="tabCenter" style="border:solid #000 1px;text-align: center;font-size: 12pt;font-family:'仿宋';">病假</th>
					<th class="tabCenter" style="border:solid #000 1px;text-align: center;font-size: 12pt;font-family:'仿宋';">事假</th>
					<th class="tabCenter" style="border:solid #000 1px;text-align: center;font-size: 12pt;font-family:'仿宋';">迟到</th>
					<th class="tabCenter" style="border:solid #000 1px;text-align: center;font-size: 12pt;font-family:'仿宋';">早退</th>
					<th class="tabCenter" style="border:solid #000 1px;text-align: center;font-size: 12pt;font-family:'仿宋';">旷课</th>
				</tr>
			</table>
			
			<p id="college"  style="font-size: 16pt;font-family: '仿宋';text-align: right;line-height: 16pt;margin-right: 64pt;margin-top: 32pt;"></p>
			<p id="now01"  style="font-size: 16pt;font-family: '仿宋';text-align: right;line-height: 16pt;margin-right: 64pt;"></p>
			<!--在往下加东西 从这往下加 不要加错，很重要-->
		
		</div>
		

	</div>



    <!--endprint-->
			
			
			<div>



				
			</div>
			


	</div>
<script>

    // var classRate = echarts.init(document.getElementById('classRate'));
    // var studentRate = echarts.init(document.getElementById('studentRate'));
    // var teacherRate = echarts.init(document.getElementById('teacherRate'));
    // var showRate = echarts.init(document.getElementById('showRate'));
    // var noClassTeacherRate = echarts.init(document.getElementById('noClassTeacherRate'));
    // var teaLate = echarts.init(document.getElementById('teaLate'));
    // var teaEarly = echarts.init(document.getElementById('teaEarly'));
    // var teaLateFirTen = echarts.init(document.getElementById('teaLateFirTen'),'');//授课前十名
    // var teaEarlyFirTen = echarts.init(document.getElementById('teaEarlyFirTen'),'');//授课后十名
    var processFitRate = echarts.init(document.getElementById('processFitRate'),'');
    var stuAttendanceRate = echarts.init(document.getElementById('stuAttendanceRate'),'');
    var prossionAttFirTen = echarts.init(document.getElementById('prossionAttFirTen'),'');
    var classAttFirTen = echarts.init(document.getElementById('classAttFirTen'),'');
    var classAttEndTen = echarts.init(document.getElementById('classAttEndTen'),'');
    var teacherTimeFirstTen = echarts.init(document.getElementById('teacherTimeFirstTen'),'');//授课前十名
    var teacherTimeEndTen = echarts.init(document.getElementById('teacherTimeEndTen'),'   ');//授课后十名
	var teacherContentPortrait=echarts.init(document.getElementById('teacherContentPortrait'));//教学内容相符率纵向比
	var workLoadPointline=echarts.init(document.getElementById('workLoadPointline'))//教学工作量点线图
    var zhengchang = echarts.init(document.getElementById('zhengchang'),'customed');
    var chidao = echarts.init(document.getElementById('chidao'));
    var zaotui = echarts.init(document.getElementById('zaotui'),'customed');
    var tiaozheng = echarts.init(document.getElementById('tiaozheng'));
    var attendanceRateTime = echarts.init(document.getElementById('attendanceRateTime'),'');
    var zhengchangOption = {
        tooltip : {
            trigger: 'axis'
        },
        calculable : true,
        legend: {
            data:['正常']
        },
        xAxis : [
            {
                type : 'category',
                splitLine : {show : false},
                data : ['周一','周二','周三','周四','周五','周六','周日']
            }
        ],
        yAxis : [
            {
                type : 'value',
                position: 'left',
                axisLabel: {
                    formatter: '{value} %'
                }
            }
        ],
        grid:{
            width:'80%'
        },
        series : [
            {
                name:'正常',
                type:'bar',
                data:[320, 332, 301, 334, 390, 330, 320]
            },
            {
                name:'出勤情况',
                type:'pie',
                tooltip : {
                    trigger: 'item',
                    formatter: '{a} <br/>{b} : {c} ({d}%)'
                },
                center: ['76%',53],
                radius : [0, '18%'],
                itemStyle :　{
                    normal : {
                        labelLine : {
                            length : 20
                        }
                    }
                },
                data:[
                    {value:1048, name:'正常'},
                    {value:251, name:'迟到'},
                    {value:147, name:'早退'},
                    {value:147, name:'调整'}
                ]
            }
        ]
    };
    var chidaoOption = {
        tooltip : {
            trigger: 'axis'
        },
        calculable : true,
        legend: {
            data:['迟到']
        },
        xAxis : [
            {
                type : 'category',
                splitLine : {show : false},
                data : ['周一','周二','周三','周四','周五','周六','周日']
            }
        ],
        yAxis : [
            {
                type : 'value',
                position: 'left',
                axisLabel: {
                    formatter: '{value} %'
                }
            }
        ],
        series : [
            {
                name:'迟到',
                type:'line',
                tooltip : {trigger: 'item'},
                stack: '广告',
                data:[120, 132, 101, 134, 90, 230, 210],
                itemStyle:{
                    normal: {
                        lineStyle:{
                            color:'green'
                        }
                    }
                },
            }
            ,{
                name:'出勤情况',
                type:'pie',
                tooltip : {
                    trigger: 'item',
                    formatter: '{a} <br/>{b} : {c} ({d}%)'
                },
                center: ['76%',53],
                radius : [0, '18%'],
                itemStyle :　{
                    normal : {
                        labelLine : {
                            length : 20
                        }
                    }
                },
                data:[
                    {value:1048, name:'正常'},
                    {value:251, name:'迟到'},
                    {value:147, name:'早退'},
                    {value:147, name:'调整'}
                ]
            }
        ]
    };
    var zaotuiOption = {
        tooltip : {
            trigger: 'axis'
        },
        calculable : true,
        legend: {
            data:['早退']
        },
        xAxis : [
            {
                type : 'category',
                splitLine : {show : false},
                data : ['周一','周二','周三','周四','周五','周六','周日']
            }
        ],
        yAxis : [
            {
                type : 'value',
                position: 'left',
                axisLabel: {
                    formatter: '{value} %'
                }
            }
        ],
        series : [
            {
                name:'早退',
                type:'bar',
                tooltip : {trigger: 'item'},
                stack: '广告',
                data:[220, 182, 191, 234, 290, 330, 310]
            },
            {
                name:'出勤情况',
                type:'pie',
                tooltip : {
                    trigger: 'item',
                    formatter: '{a} <br/>{b} : {c} ({d}%)'
                },
                center: ['76%',53],
                radius : [0, '18%'],
                itemStyle :　{
                    normal : {
                        labelLine : {
                            length : 20
                        }
                    }
                },
                data:[
                    {value:1048, name:'正常'},
                    {value:251, name:'迟到'},
                    {value:147, name:'早退'},
                    {value:147, name:'调整'}
                ]
            }
        ]
    };
    var tiaozhengOption = {
        tooltip : {
            trigger: 'axis'
        },
        calculable : true,
        legend: {
            data:['调整']
        },
        xAxis : [
            {
                type : 'category',
                splitLine : {show : false},
                data : ['周一','周二','周三','周四','周五','周六','周日']
            }
        ],
        yAxis : [
            {
                type : 'value',
                position: 'left',
                axisLabel: {
                    formatter: '{value} %'
                }
            }
        ],
        series : [
            {
                name:'调整',
                type:'bar',
                tooltip : {trigger: 'item'},
                data:[150, 232, 201, 154, 190, 330, 410]
            },
            {
                name:'出勤情况',
                type:'pie',
                tooltip : {
                    trigger: 'item',
                    formatter: '{a} <br/>{b} : {c} ({d}%)'
                },
                center: ['76%',53],
                radius : [0, '18%'],
                itemStyle :　{
                    normal : {
                        labelLine : {
                            length : 20
                        }
                    }
                },
                data:[
                    {value:1048, name:'正常'},
                    {value:251, name:'迟到'},
                    {value:147, name:'早退'},
                    {value:147, name:'调整'}
                ]
            }
        ]
    };
    var attendanceRateTimeLineOption = {
        title : {
            text: '到课率纵向比',
            x:'center'
        },
        xAxis: {
            type: 'category',
            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        },
        yAxis: {
            type: 'value',
            axisLabel: {
                formatter: '{value} %'
            }
        },
        series: [{
            data: [820, 932, 901, 934, 1290, 1330, 1320],
            type: 'line',
            smooth: true,
            markLine: {
                data: [
                    {type: 'average', name: '平均值'}
                ]
            }
        }
        ]
    };
    var workLoadPointlineOption = {
        title : {
            text: '各学院教师平均课时数对比',
            x:'center'
        },
        legend: {
            data:['平均课时数'],
            left:0,
            top:0
        },
        xAxis: [{
            type: "category",
            data: ["学院1", "学院2", "学院3", "学院4", "学院5", "学院6", "学院7"],
            axisLabel: {
                interval:0,
                rotate:40
            }
        }],
        yAxis: {
            type : 'value',
            scale:true,
            axisLabel : {
                formatter: '{value} 课时'
            },
            splitLine: {
                show: false
            }
        },
        series: [
            {
                name: "平均课时数",
                type: "scatter",
                symbolSize: 20,

                markLine : {
                    lineStyle: {
                        normal: {
                            type: 'solid'
                        }
                    },
                    data : [
                        // { yAxis: 20,name:'平均值' },
                        {type : 'average', name: '平均值'},
                    ]
                },
                itemStyle: {
                    normal: {
                        borderColor: '#fff',
                        borderWidth: 2,
                        color: '#e1694b',
                        opacity: 1,
                    }
                },
                data: [30, 20, 39, 40, 15, 56, 70]

            }
        ]
    };


    // var classRateOption  = {
    //     title : {
    //         text: '行政班级占比',
    //         x:'center',
    //         left:'center'
    //     },
    //     grid:{
    //         y:50,
    //     },
    //     tooltip : {
    //         trigger: 'item',
    //         formatter: "{a} <br/>{b} : {c} ({d}%)"
    //     },
    //     legend: {
    //         orient: 'vertical',
    //         left: 'left',
    //         // data: ['优','良','差']
    //     },
    //     series : [
    //         {
    //             name: '占比',
    //             type: 'pie',
    //             // radius : '55%',
    //             // center: ['50%', '60%'],
    //             data:[
    //                 {value:10, name:'本院'},
    //                 {value:20, name:''}
    //             ],
    //             itemStyle: {
    //                 emphasis: {
    //                     shadowBlur: 10,
    //                     shadowOffsetX: 0,
    //                     shadowColor: 'rgba(0, 0, 0, 0.5)'
    //                 }
    //             }
    //         }
    //     ]
    // };
    var studentRateOption  = {
        title : {
            text: '在校生占比',
            x:'center'
        },
        tooltip : {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        legend: {
            data:['早退']
        },
        legend: {
            orient: 'vertical',
            left: 'left',
            // data: ['优','良','差']
        },
        series : [
            {
                name: '占比',
                type: 'pie',
                // radius : '55%',
                // center: ['50%', '60%'],
                data:[
                    {value:335, name:'优'},
                    {value:310, name:'良'},
                    {value:234, name:'差'}
                ],
                itemStyle: {
                    emphasis: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };
    var teacherRateOption  = {
        title : {
            text: '任课老师占比',
            x:'center'
        },
        tooltip : {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        legend: {
            orient: 'vertical',
            left: 'left',
            // data: ['优','良','差']
        },
        series : [
            {
                name: '占比',
                type: 'pie',
                // radius : '55%',
                // center: ['50%', '60%'],
                data:[
                    {value:335, name:'优'},
                    {value:310, name:'良'},
                    {value:234, name:'差'}
                ],
                itemStyle: {
                    emphasis: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };
    var showRateOption  = {
        title : {
            text: '显示所占比例',
            x:'center'
        },
        tooltip : {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        legend: {
            orient: 'vertical',
            left: 'left',
            // data: ['优','良','差']
        },
        series : [
            {
                name: '占比',
                type: 'pie',
                // radius : '55%',
                // center: ['50%', '60%'],
                data:[
                    {value:335, name:'优'},
                    {value:310, name:'良'},
                    {value:234, name:'差'}
                ],
                itemStyle: {
                    emphasis: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };
    var noClassTeacherRateOption  = {
        title : {
            text: '无课教师占比：',
            x:'center'
        },
        tooltip : {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        legend: {
            orient: 'vertical',
            left: 'left',
            // data: ['优','良','差']
        },
        series : [
            {
                name: '占比',
                type: 'pie',
                // radius : '55%',
                // center: ['50%', '60%'],
                data:[
                    {value:335, name:'优'},
                    {value:310, name:'良'},
                    {value:234, name:'差'}
                ],
                itemStyle: {
                    emphasis: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };
    var teaLateOption  = {
        title : {
            text: '迟到教师占比：',
            x:'center'
        },
        tooltip : {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        legend: {
            orient: 'vertical',
            data: ['优','良','差'],
             left: 20,
		     top: 0,
		    
        },
        series : [
            {
                name: '占比',
                type: 'pie',
                radius : '60%',
                center: ['50%', '60%'],
                data:[
                    {value:335, name:'优'},
                    {value:310, name:'良'},
                    {value:234, name:'差'}
                ],
                itemStyle: {
                    emphasis: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };
    // var teaEarlyOption  = {
    //     title : {
    //         text: '早退教师占比：',
    //         x:'center'
    //     },
    //     tooltip : {
    //         trigger: 'item',
    //         formatter: "{a} <br/>{b} : {c} ({d}%)"
    //     },
    //     legend: {
    //         orient: 'vertical',
    //         left: 'left',
    //         // data: ['优','良','差']
    //     },
    //     series : [
    //         {
    //             name: '占比',
    //             type: 'pie',
    //             // radius : '55%',
    //             // center: ['50%', '60%'],
    //             data:[
    //                 {value:335, name:'优'},
    //                 {value:310, name:'良'},
    //                 {value:234, name:'差'}
    //             ],
    //             itemStyle: {
    //                 emphasis: {
    //                     shadowBlur: 10,
    //                     shadowOffsetX: 0,
    //                     shadowColor: 'rgba(0, 0, 0, 0.5)'
    //                 }
    //             }
    //         }
    //     ]
    // };
    var  teaLateFirTenOption = {
        title: {
            text: '教师迟到前十名',
        },
        legend: {
            data:['迟到']
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow'
            }
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        xAxis: {
            type: 'value',
            boundaryGap: [0, 0.01]
        },
        yAxis: {
            type: 'category',
            data: ['巴西','印尼','美国','印度','中国','世界人口(万)']
        },
        series: [
            {
                name: '迟到',
                type: 'bar',
                barWidth: 20,//固定柱子宽度
                data: [19325, 23438, 31000, 121594, 134141, 681807]
            }
        ]
    };
    var  teaEarlyFirTenOption = {
        title: {
            text: '教师早退前十名',
        },
        legend: {
            data:['早退']
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow'
            }
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        xAxis: {
            type: 'value',
            boundaryGap: [0, 0.01]
        },
        yAxis: {
            type: 'category',
            data: ['巴西','印尼','美国','印度','中国','世界人口(万)']
        },
        series: [
            {
                name: '早退',
                type: 'bar',
                barWidth: 20,//固定柱子宽度
                data: [19325, 23438, 31000, 121594, 134141, 681807]
            }
        ]
    };
    var processFitRateOption = {
        title : {
            text: '教学进度与教学日历相符率',
            x:'center'
        },
        tooltip : {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        legend: {
            orient: 'vertical',
            left: 0,
//          top:'20%',
            bottom:'10%',
            data: ['相符','不相符']
        },
        series : [
            {
                name: '占比',
                type: 'pie',
                radius : '80%',
                // center: ['50%', '60%'],
                data:[
                    {value:335, name:'优'},
                    {value:310, name:'良'},
                    {value:234, name:'差'}
                ],
                itemStyle: {
                    emphasis: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };
    var stuAttendanceRateOption= {
        title : {
//          text: '学生到课率占比',
            x:'center'
        },
        tooltip : {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        legend: {
            orient: 'vertical',
            left: 0,
            top:0,
//          data: ['出勤','公假','私假','病假','迟到','早退','旷课']
        },
        series : [
            {
                name: '占比',
                type: 'pie',
                radius : '60%',
//              center: ['50%', '60%'],
//              label:{
////              	position:'outside',
//              	show:false
//              	
//              },
//              labelLine:{
////              	smooth:true,
//              	show:false
//              },
                data:[
                    {value:335, name:'优'},
                    {value:310, name:'良'},
                    {value:234, name:'差'}
                ],
                itemStyle: {
                    emphasis: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };

    var teacherContentPortraitOption = {
        title : {
            text: '教学内容相符率纵向比',
            x:'center'
        },
        legend: {
            data:['相符率'],
            left:0,
            top:24
        },
        xAxis:  {
            type: 'category',
            data: ['','','','','','','','','','',''],
            // axisLabel: {
            //     interval:0,
            //     rotate:40
            // }
        },
        yAxis: {
            type: 'value',
            axisLabel: {
                formatter: '{value} %'
            }
        },
        series: [{
            data: [820, 932, 901, 934, 1290, 1330, 1320],
            type: 'line',
			name:'相符率',
            smooth: true,
            markLine: {
                data: [
                    {type: 'average', name: '平均值'}
                ]
            }
        }
        ]
    };
    
    var prossionAttFirTenOption  = {
        title: {
//          text: '专业到课排行',
            subtext: '前十名'
        },
        grid: {
            y2: 140
        },
        tooltip: {
        },
        toolbox: {
        },
        xAxis:  {
            type: 'category',
            data: ['','','','','','','','','','',''],
            axisLabel: {
                interval:0,
                rotate:40
            }
        },
        yAxis: {
            type: 'value',
            axisLabel: {
                formatter: '{value} %'
            }
        },
        series: [
            {
                name:'到课率',
                type:'bar',
                data:[100,100,100,100,100,100,100,100,100,100],
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                },
                // markLine: {
                //     data: [
                //         {type: 'average', name: '平均值'}
                //     ]
                // }
            }
        ]
    };
    var classAttFirTenOption  = {
        title: {
//          text: '班级到课率排行前十名',
            subtext: '前十名'
        },
        grid: {
            y2: 140
        },
        tooltip: {
        },
        toolbox: {
        },
        xAxis:  {
            type: 'category',
            data: ['','','','','','','','','','',''],
            axisLabel: {
                interval:0,
                rotate:40
            }
        },
        yAxis: {
            type: 'value',
            axisLabel: {
                formatter: '{value} %'
            }
        },
        series: [
            {
                name:'到课率',
                type:'bar',
                data:[100,100,100,100,100,100,100,100,100,100],
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                },
                // markLine: {
                //     data: [
                //         {type: 'average', name: '平均值'}
                //     ]
                // }
            }
        ]
    };
    var classAttEndTenOption = {
        title: {
//          text: '班级到课率排行后十名',
            subtext: '前十名'
        },
        grid: {
            y2: 140
        },
        tooltip: {
        },
        toolbox: {
        },
        xAxis:  {
            type: 'category',
            data: ['','','','','','','','','','',''],
            axisLabel: {
                interval:0,
                rotate:40
            }
        },
        yAxis: {
            type: 'value',
            axisLabel: {
                formatter: '{value} %'
            }
        },
        series: [
            {
                name:'到课率',
                type:'bar',
                data:[100,100,100,100,100,100,100,100,100,100],
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                },
                // markLine: {
                //     data: [
                //         {type: 'average', name: '平均值'}
                //     ]
                // }
            }
        ]
    };
    var teacherTimeFirstTenOption = {
        title: {
            text: '平均授课时长前十名的教师：',
            subtext: '前十名'
        },
        legend: {
            data:['授课时长']
        },
        grid: {
            y2: 80
        },
        tooltip: {
        },
        toolbox: {
        },
        xAxis:  {
            type: 'category',
            data: ['','','','','','','','','','',''],
            axisLabel: {
                interval:0,
                rotate:40
            }
        },
        yAxis: {
            type: 'value',
            axisLabel: {
                formatter: '{value} %'
            }
        },
        series: [
            {
                name:'到课率',
                type:'bar',
                data:[100,100,100,100,100,100,100,100,100,100],
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                },
                // markLine: {
                //     data: [
                //         {type: 'average', name: '平均值'}
                //     ]
                // }
            }
        ]
    };
    var teacherTimeEndTenOption = {
        title: {
            text: '平均授课时长后十名的教师',
            subtext: '后十名'
        },
        legend: {
            data:['授课时长']
        },
        grid: {
            y2: 80
        },
        tooltip: {
        },
        toolbox: {
        },
        xAxis:  {
            type: 'category',
            data: ['','','','','','','','','','',''],
            axisLabel: {
                interval:0,
                rotate:40
            }
        },
        yAxis: {
            type: 'value',
            axisLabel: {
                formatter: '{value} %'
            }
        },
        series: [
            {
                name:'授课时长',
                type:'bar',
                data:[100,100,100,100,100,100,100,100,100,100],
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                },
                // markLine: {
                //     data: [
                //         {type: 'average', name: '平均值'}
                //     ]
                // }
            }
        ]
    };

    window.onresize = function(){
        // chidao.resize()
        // zaotui.resize()
    }

    function setclassRateOption(r) {
        var v=r.data.classTotal
        var v1=r.data.allClassTotal-r.data.classTotal;
        classRateOption.series[0].radius="60%"
        classRateOption.series[0].data=[
            {value:v, name:'本院'},
            {value:v1, name:'其余院系'}]


    }
    function setStudentRate(r) {
        var v=r.data.studentTotal
        var v1=r.data.allstudentTotal-r.data.studentTotal;
        studentRateOption.series[0].data=[
            {value:v, name:'本院'},
            {value:v1, name:'其余院系'}]
}
    function setTeacherRate(r) {
        var v=r.data.teacherTotal
        var v1=r.data.allteacherTotal-r.data.teacherTotal;
        teacherRateOption.series[0].data=[
            {value:v, name:'本院'},
            {value:v1, name:'其余院系'}]
    }
    function setTeacherDiary(r) {
        zhengchangOption.xAxis[0].data=r.data.teacherAttendanceTimePie.xAxis;
        chidaoOption.xAxis[0].data=r.data.teacherAttendanceTimePie.xAxis;
        zaotuiOption.xAxis[0].data=r.data.teacherAttendanceTimePie.xAxis;
        tiaozhengOption.xAxis[0].data=r.data.teacherAttendanceTimePie.xAxis;


        zhengchangOption.series[0]=r.data.teacherAttendanceTimePie.data[0];
        chidaoOption.series[0]=r.data.teacherAttendanceTimePie.data[1];
        zaotuiOption.series[0]=r.data.teacherAttendanceTimePie.data[2];
        tiaozhengOption.series[0]=r.data.teacherAttendanceTimePie.data[3];

        zhengchangOption.series[0].itemStyle=window.getLineColor('zhengchangOption')
        chidaoOption.series[0].itemStyle=window.getLineColor('chidaoOption')
        zaotuiOption.series[0].itemStyle=window.getLineColor('zaotuiOption')
        tiaozhengOption.series[0].itemStyle=window.getLineColor('tiaozhengOption')

        zhengchangOption.series[1].data=r.data.teacherAttendancePie;
        chidaoOption.series[1].data=r.data.teacherAttendancePie;
        zaotuiOption.series[1].data=r.data.teacherAttendancePie;
        tiaozhengOption.series[1].data=r.data.teacherAttendancePie;


//              pie.setOption(pieOption);
        zhengchang.setOption(zhengchangOption);
        chidao.setOption(chidaoOption);
        zaotui.setOption(zaotuiOption);
        tiaozheng.setOption(tiaozhengOption);

    }
    function getSeries(data) {
        var     series=
            {
                name:'授课时长',
                type:'bar',
                data:data,
                barWidth : 30,//柱图宽度
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                },
                // markLine: {
                //     data: [
                //         {type: 'average', name: '平均值'}
                //     ]
                // }
            }
        return series;
    }
    function getLineColor(data){
        var colorJson={
            zhengchangOption:'#38ec49',
            chidaoOption:'#e40d0d',
            zaotuiOption:'#ecd61c',
            tiaozhengOption:'#1870e9'
        }
        var value={
            normal:{
                color:colorJson[data],
                lineStyle:{
                    color:colorJson[data]
                }
            }
        }
        return value
    }
    $(function () {
    	
    	
    	$("#printThis").on('click',function(){
    		// setHtml('#classRate')
    	//	setHtml('#noClassTeacherRate')
    		setHtml('#teaEarlyFirTen')
    		setHtml('#teacherTimeFirstTen')
    		setHtml('#teacherTimeEndTen')
    		setHtml('#processFitRate')
    		setHtml('#teacherContentPortrait')
    		setHtml('#workLoadPointline')
            setHtml('#zhengchang')
            setHtml('#chidao')
            setHtml('#zaotui')
            setHtml('#tiaozheng')
            setHtml('#stuAttendanceRate')
            setHtml('#prossionAttFirTen')
            setHtml('#classAttFirTen')
            setHtml('#classAttEndTen')
            setHtml('#attendanceRateTime')
//  		alert(getSrc('#classRate'))
//  		$("#giveDrc").attr('src',getSrc('#classRate'))
			setTimeout(function(){
				$("#printMe").wordExport()
			},2000)
    		
    	})
    	
    	
        // $.ajax({
        //     url: baseURL + "/college/getAllStudentCollege",
        //     data: {},
        //     success: function (r) {
        //         $("#option").append("<option value=''>全校</option>");
        //         for (i = 0; i < r.list.length; i++) {
        //             var tname = r.list[i].collegeName;
        //             var tid = r.list[i].collegeName;
        //             $("#option").append("<option value='" + tid + "'>" + tname + "</option>");
        //         }
        //     }
        // });
        // classRate.setOption(classRateOption)
        // studentRate.setOption(studentRateOption)
        // teacherRate.setOption(showRateOption)
        // showRate.setOption(teacherRateOption)
        // noClassTeacherRate.setOption(noClassTeacherRateOption);
        // teaLate.setOption(teaLateOption)
        // teaEarly.setOption(teaEarlyOption)
        // teaLateFirTen.setOption(teaLateFirTenOption)
        // teaEarlyFirTen.setOption(teaEarlyFirTenOption)
        // processFitRate.setOption(processFitRateOption)
        // stuAttendanceRate.setOption(stuAttendanceRateOption)
        // classAttFirTen.setOption(classAttFirTenOption)
        // classAttEndTen.setOption(classAttEndTenOption)
        // studentAttendenceChartFirstTen.setOption(firstTenOption);
        // studentAttendenceChartEndTen.setOption(endTenOption);
        setDate('3')
        
    });
    function query(){
        vm.query()
    }

    function getQingjia(list) {
        var sijia=getJia('私假',list)
        var gongjia=getJia('公假',list)
        var bingjia=getJia('病假',list)
        return sijia+gongjia+bingjia;
    }
    function getJia(str,list) {
        for(var i=0;i<list.length;i++)
        {
            if(list[i].name==str) return list[i].value
        }
        return 0;
    }

    var vm = new Vue({
        el:'#rrapp',
        data:{
            q:{
                key: null,
                startDate:null,
                endDate:null
            },
            showList: true,
            title: null,
            ClassDiary: {},
            diaryPostTime: null,
            term: {}
        },
        methods: {
            query: function () {
                var college=$('#college', window.parent.document).html();
                $.ajax({
                    url: baseURL + "/report/getZhenduanReport",
                    data: {
                        'startDate':$('#startDate').val(),
                        'endDate':$('#endDate').val(),
                        'collegeName':college

                    },
                    success: function (r) {
                        let s = $('#startDate').val().replace(/(.+?)\-(.+?)\-(.+)/, "$1年$2月$3日")
                        let e = $('#endDate').val().replace(/(.+?)\-(.+?)\-(.+)/, "$1年$2月$3日")

                        $('#printTitle').html(
                            `
                        山东华创学院${$('#startDate').val()}至${$('#endDate').val()}

                    <br>教学运行数据报告`
                        );

                        $('#line01').html(
                            `
                        ${s}至${e},教学组织活动如下：`
                        )
                        $('#college').html($('#college', window.parent.document).html())
                        $('#now').html(new Date().toLocaleDateString());
                        $('#now01').html(new Date().toLocaleDateString());
                        $('#college').html($("#option").val());
                        $('#startTime').html($("#startDate").val());
                        $('#endTime').html($("#endDate").val());

                        $('#studentTotal').html(r.data.studentTotal);
                        $('#classTotal').html(r.data.classTotal);
//                      $('#classTotal01').html(r.data.classTotal);
                        $('#classTotal02').html(r.data.classTotal);
                        $('#classTotal03').html(r.data.classTotal);
                        $('#teacherTotal').html(r.data.teacherTotal);
                        var classRateTable = ((parseFloat(r.data.classTotal) / parseFloat(r.data.allClassTotal)) * 100).toFixed(2)
                        $("#classRateTable").html(classRateTable + '%');
                        var studentsRateTable = ((parseFloat(r.data.studentTotal) / parseFloat(r.data.allstudentTotal)) * 100).toFixed(2)
                        $("#studentRateTable").html(studentsRateTable + '%');
                        var teacherRateTable = ((parseFloat(r.data.teacherTotal) / parseFloat(r.data.allteacherTotal)) * 100).toFixed(2)
                        $("#teacherRateTable").html(teacherRateTable + '%');

                        $("#teacherTotal01").html(r.data.teacherTotal);

                        // setclassRateOption(r);
                        // setStudentRate(r);
                        // setTeacherRate(r);

                        setTeacherDiary(r);
                        $("#teacherAttTable  tr:not(:first)").empty("");
                        $("#teacherTimeTable  tr:not(:first)").empty("");
                        $("#studentAttTable  tr:not(:first)").empty("");
                        if(r.data.teacherAttTable.length==0){
                            var tr = `<tr>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               </tr>`
                            $('#teacherAttTable').append(tr);
                            $('#teacherAttTable').append(tr);
                        }
                        else {
                            for (var i = 0; i < r.data.teacherAttTable.length; i++) {
                                var tr = `<tr>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.teacherAttTable[i].diaryPostTime}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.teacherAttTable[i].courseTeacherName}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.teacherAttTable[i].courseName}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.teacherAttTable[i].courseWhichIndex}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.teacherAttTable[i].className}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.teacherAttTable[i].arriveTime}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.teacherAttTable[i].leaveTime}</td>
                               </tr>`
                                $('#teacherAttTable').append(tr);

                            }
                        }
                        if(r.data.teacherTimeTable.length==0){
                            var tr = `<tr>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               </tr>`

                            $('#teacherTimeTable').append(tr);
                            $('#teacherTimeTable').append(tr);
                        }else {
                            for (var i = 0; i < r.data.teacherTimeTable.length; i++) {
                                var tr = `<tr>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.teacherTimeTable[i].diaryPostTime}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.teacherTimeTable[i].courseTeacherName}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.teacherTimeTable[i].courseName}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.teacherTimeTable[i].courseWhichIndex}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.teacherTimeTable[i].className}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.teacherTimeTable[i].teachLength}</td>
                               </tr>`


                                $('#teacherTimeTable').append(tr);
                            }
                        }
                        if(r.data.studentAttTable.length==0){
                            var tr = `<tr>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">&nbsp</td>
                               </tr>`
                            $('#studentAttTable').append(tr);
                            $('#studentAttTable').append(tr);
                        }else {
                            for (var i = 0; i < r.data.studentAttTable.length; i++) {
                                var tr = `<tr>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.studentAttTable[i].dateTime}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.studentAttTable[i].className}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.studentAttTable[i].gongjia}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.studentAttTable[i].bingjia}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.studentAttTable[i].sijia}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.studentAttTable[i].chidao}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.studentAttTable[i].zaotui}</td>
                               <td class="tabCenter" boder="1" cellspacing="0"  cellpadding="0" style="border:solid #000 1px;text-align: center;font-size: 8pt;font-family:'仿宋';">${ r.data.studentAttTable[i].kuangke}</td>
                               </tr>`


                                $('#studentAttTable').append(tr);
                            }
                        }




                        $('#hasCourse').html(r.data.hasCourse[0].value);
                        $('#noCourse').html(r.data.hasCourse[1].value);
                        noClassTeacherRateOption.series[0].data=r.data.hasCourse
                        noClassTeacherRateOption.series[0].radius='60%'
//                      teaLateOption.series[0].data=r.data.teacherAttendancePie
                        var chidaozaotui=parseInt(r.data.teacherAttendancePie[1].value)+parseInt(r.data.teacherAttendancePie[2].value);
                        $('#chidaozaotui').html(chidaozaotui);
                         teaLateFirTenOption.yAxis.data=r.data.chidao.xData;
                        teaLateFirTenOption.series[0].data=r.data.chidao.seriesData;
                        teaEarlyFirTenOption.yAxis.data=r.data.zaotui.xData;
                        teaEarlyFirTenOption.series[0].data=r.data.zaotui.seriesData;
                        $('#teacherTime').html(r.data.teacherTime.toFixed(2));
                        $('#allSchoolTeacherTime').html(r.data.allSchoolTeacherTime.toFixed(2));
//                      if(r.data.teacherTime.toFixed(2)>=r.data.allSchoolTeacherTime.toFixed(2)){
//                          $('#compare').html('高于');
//                      }else{
//                          $('#compare').html('低于');
//                      }
                        teacherTimeFirstTenOption.xAxis.data=r.data.rank.classNamesFirstTen;
                        teacherTimeFirstTenOption.series=getSeries(r.data.rank.rateFirstTen);

                        teacherTimeEndTenOption.xAxis.data=r.data.rank.classNamesEndtTen;
                        teacherTimeEndTenOption.series=getSeries(r.data.rank.rateEndTen);
                        $('#coureTotal').html(r.data.coureTotal);
                        var processFit=r.data.xiangfuRate[0].value/(r.data.xiangfuRate[0].value+r.data.xiangfuRate[1].value)*100
                        $('#processFit').html(processFit.toFixed(2));
                        processFitRateOption.series[0].data=r.data.xiangfuRate;
                        processFitRateOption.series[0].radius='60%'
                        processFitRate.setOption(processFitRateOption);
                        var qingjiaNumber=r.data.sijiaNumber+r.data.gongjiaNumber+r.data.bingjiaNumber
                        $('#chuqinNumber').html(r.data.chuqinNumber);
                        $('#qingjiaNumber').html(qingjiaNumber);
                        $('#qingjia').html(getQingjia(r.data.coincidenceRate.series));
                        $('#sijiaNumber').html(r.data.sijiaNumber);
                        $('#gongjiaNumber').html(r.data.gongjiaNumber);
                        $('#bingjiaNumber').html(r.data.bingjiaNumber);

                        $('#kuangke').html(getJia('旷课',r.data.coincidenceRate.series));
                        $('#chidaoTotal').html(getJia('迟到',r.data.coincidenceRate.series));
                        stuAttendanceRateOption.series[0].data=r.data.coincidenceRate.series;
                       // stuAttendanceRateOption.legend.data=r.data.coincidenceRate.legend;
                        stuAttendanceRate.setOption(stuAttendanceRateOption);

                        prossionAttFirTenOption.xAxis.data=r.data.pressionRate.classNamesFirstTen;
                        prossionAttFirTenOption.series=getSeries(r.data.pressionRate.rateFirstTen);

                        teacherContentPortraitOption.xAxis.data=r.data.teacherContentPortrait.xData;
                        teacherContentPortraitOption.series[0].data=r.data.teacherContentPortrait.seriesData;


                        classAttFirTenOption.xAxis.data=r.data.ClassRate.classNamesFirstTen;
                        classAttFirTenOption.series=getSeries(r.data.ClassRate.rateFirstTen);

                        classAttEndTenOption.xAxis.data=r.data.ClassRate.classNamesEndtTen;
                        classAttEndTenOption.series=getSeries(r.data.ClassRate.rateEndTen);

                        workLoadPointlineOption.xAxis[0].data=r.data.workLoadPointline.xAxis;
                        workLoadPointlineOption.series[0].data=r.data.workLoadPointline.data;

                        attendanceRateTimeLineOption.xAxis.data=r.data.attendanceRateTime.xData;
                        attendanceRateTimeLineOption.series[0].data=r.data.attendanceRateTime.seriesData;

                        // classRate.setOption(classRateOption)
                        // studentRate.setOption(studentRateOption)
                        // teacherRate.setOption(teacherRateOption)
                       // showRate.setOption(showRateOption)
                        //noClassTeacherRate.setOption(noClassTeacherRateOption);
                       // teaLate.setOption(teaLateOption)
                        // teaEarly.setOption(teaEarlyOption)
                        // teaLateFirTen.setOption(teaLateFirTenOption)
                        // teaEarlyFirTen.setOption(teaEarlyFirTenOption)
                        prossionAttFirTen.setOption(prossionAttFirTenOption)
                        stuAttendanceRate.setOption(stuAttendanceRateOption)
                        classAttFirTen.setOption(classAttFirTenOption)
                        classAttEndTen.setOption(classAttEndTenOption)
                        teacherTimeFirstTen.setOption(teacherTimeFirstTenOption);
                        teacherTimeEndTen.setOption(teacherTimeEndTenOption);
						teacherContentPortrait.setOption(teacherContentPortraitOption)
						workLoadPointline.setOption(workLoadPointlineOption)
                        attendanceRateTime.setOption(attendanceRateTimeLineOption)

                    }
                });



            },
            add: function(){
                vm.showList = false;
                vm.title = "新增";
                vm.ClassDiary = {};
            },
            update: function () {
                var id = getSelectedRow();
                if(id == null){
                    return ;
                }
                $.get(baseURL + "ClassDiaryTable/Info/"+id, function(r){
                    vm.showList = false;
                    vm.title = "修改";
                    vm.ClassDiary = r.ClassDiary;
                    vm.diaryPostTime = r.ClassDiary.diaryPostTime;
                });
            },
            del: function () {
                var ids = getSelectedRows();
                if(ids == null){
                    return ;
                }
                confirm('确定要删除选中的记录？', function(){
                    $.ajax({
                        type: "POST",
                        url: baseURL + "ClassDiary/Delete",
                        contentType: "application/json",
                        data: JSON.stringify(ids),
                        success: function(r){
                            if(r.code == 0){
                                alert('操作成功', function(){
                                    vm.reload();
                                });
                            }else{
                                alert(r.msg);
                            }
                        }
                    });
                });
            },
            saveOrUpdate: function () {
                if(vm.validator()){
                    return ;
                }

                var url = vm.ClassDiary.diaryPostTime == vm.diaryPostTime ? "ClassDiaryTable/Update" : "ClassDiaryTable/Insert";
                $.ajax({
                    type: "POST",
                    url: baseURL + url,
                    contentType: "application/json",
                    data: JSON.stringify(vm.ClassDiary),
                    success: function(r){
                        if(r.code === 0){
                            alert('操作成功', function(){
                                vm.reload();
                            });
                        }else{
                            alert(r.msg);
                        }
                    }
                });
            },
            reload: function () {
            },
            validator: function () {
                if(isBlank(vm.ClassDiary.diaryPostTime)){
                    alert("考评时间不能为空");
                    return true;
                }
                if(isBlank(vm.ClassDiary.courseTeacherName)){
                    alert("教师姓名不能为空");
                    return true;
                }
                if(isBlank(vm.ClassDiary.courseName)){
                    alert("课程名称不能为空");
                    return true;
                }
                if(isBlank(vm.ClassDiary.arriveTime)){
                    alert("到达时间不能为空");
                    return true;
                }
                if(isBlank(vm.ClassDiary.leaveTime)){
                    alert("离开时间不能为空");
                    return true;
                }
                if(isBlank(vm.ClassDiary.teachLength)){
                    alert("教授时长不能为空");
                    return true;
                }
            }
        }
    });


    function setHtml(id) {
    	
        var img=getFullCanvasDataURL(id)

        var imgdiv='<img  src="'+img+'"/>';
        $(id).html(imgdiv);
        var h= $(id).height();
        var w= $(id).width();
        imgdiv='<img  src="'+img+'" width="'+w+'" height="'+h+'" />';
        $(id).html(imgdiv);

    }
    function getSrc(id){
    	var img=getFullCanvasDataURL(id)
    	return img+''
    }
    function getFullCanvasDataURL(divId){
        //将第一个画布作为基准。
        var baseCanvas = $(divId).find("canvas").first()[0];
        if(!baseCanvas){
            return false;
        };
        var width = baseCanvas.width;
        var height = baseCanvas.height;
        var ctx = baseCanvas.getContext("2d");
        //遍历，将后续的画布添加到在第一个上
        $(divId).find("canvas").each(function(i,canvasObj){
            if(i>0){
                var canvasTmp = $(canvasObj)[0];
                ctx.drawImage(canvasTmp,0,0,width,height);
            }
        });
        //获取base64位的url
        return baseCanvas.toDataURL();
    }
</script>
</body>
</html>